var tex = document.querySelectorAll(".xz > li");
var te = document.querySelectorAll(".wt > div");
for (var i = 0;i<tex.length;i++){
    tex[i].index=i;
    tex[i].addEventListener('mousemove',function () {
        for (var k = 0;k<tex.length;k++){
            tex[k].classList.remove('active');
           te[k].classList.remove('active');
        }
        this.classList.add('active');
        te[this.index].classList.add('active');
    })
}




//返回顶部
var t = document.querySelector("#fh");
window.onscroll = function () {
    console.log(document.documentElement.scrollTop > 500 || document.body.scrollTop > 500);
    if (document.documentElement.scrollTop > 500 || document.body.scrollTop > 500){
        t.style.display = "block";
    }else {
        t.style.display = "none";
    }
};
t.addEventListener('click',function () {
    window.scrollTo({
        top:0,
        behavior:'smooth'})
});